Skip to content

PLUG-78 Regenerate Diagram Integration #47

Merged
Prashant-7718 merged 3 commits into
mainfrom
PLUG-78-vscode-pre-commit-diagram-sync-auto-regenerate-mermaid-diagrams-when-referenced-source-files-are-staged
May 28, 2026
Merged

PLUG-78 Regenerate Diagram Integration #47
Prashant-7718 merged 3 commits into
mainfrom
PLUG-78-vscode-pre-commit-diagram-sync-auto-regenerate-mermaid-diagrams-when-referenced-source-files-are-staged

Conversation

@Prashant-7718
Copy link
Copy Markdown
Contributor

@Prashant-7718 Prashant-7718 commented May 19, 2026

This PR added a regenerate method to the SDK that complements our Mermaid Diagram Sync GitHub App functionality.

This method should accept the existing Mermaid diagram content along with source file changes, and regenerate the diagram based on those updates while preserving the overall diagram structure and intent.

Copilot AI review requested due to automatic review settings May 19, 2026 10:59
@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
office-plugin-site Ignored Ignored May 28, 2026 8:19am

Request Review

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds SDK support for the Mermaid AI diagram regeneration endpoint, allowing clients to regenerate Mermaid diagrams from updated source file contents.

Changes:

  • Adds the openai.regenerate REST URL.
  • Introduces request/response types for diagram regeneration.
  • Adds MermaidChart.regenerateDiagram() with unit and E2E coverage.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/sdk/src/urls.ts Adds the regenerate OpenAI endpoint URL.
packages/sdk/src/types.ts Defines regenerate request and response interfaces.
packages/sdk/src/index.ts Adds the public SDK method for regeneration.
packages/sdk/src/index.test.ts Covers POST behavior, credit usage passthrough, and 402 handling.
packages/sdk/src/index.e2e.test.ts Adds an E2E smoke test for regeneration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@aloisklink aloisklink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a changeset if you want to release it!

(Please also write a PR description, even if it's just what you've written in the changeset).

Comment thread packages/sdk/src/index.test.ts Outdated
Comment thread packages/sdk/src/index.e2e.test.ts
Copilot AI review requested due to automatic review settings May 28, 2026 08:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread packages/sdk/src/index.ts
@Prashant-7718 Prashant-7718 merged commit eb6546e into main May 28, 2026
51 checks passed
@github-actions github-actions Bot mentioned this pull request May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants